//
//  ViewController.swift
//  BLE-Peripheral
//
//  Created by wujia121 on 2018/2/8.
//  Copyright © 2018年 steven. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        print(#function)
    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        
        
        if WZPeripheralManager.shared.checkAuthorizeStatus() {
            //print("用户已授权App使用BLE服务")            
        } else {
            UIAlertController.showAlertController(style: .alert, title: "温馨提示", message: "检查手机蓝牙是否已开启", okActionTitle: "设置", okAction: { (action) in
                UIApplication.shared.open(URL(string: UIApplicationOpenSettingsURLString)!, options: [:], completionHandler: nil)
            }, cancelActionTitle: "取消", cancelAction: nil)
        }
    }

}

